/**
 * Created by HREN_VAM.
 */
package net;

import java.net.InetAddress;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class DataBaseClient {
    private Map<String, InetAddress> h;

    public InetAddress getAddress(String name) {
        return h.get(name);
    }

    public void add(String name, InetAddress address) {
        h.put(name, address);
    }

    private static DataBaseClient ourInstance = new DataBaseClient();

    public static DataBaseClient getInstance() {
        return ourInstance;
    }

    private DataBaseClient() {
        h = new ConcurrentHashMap<String, InetAddress>();
    }
}
